object Practise3 {
    def jiOu(numbers:List[Int]):List[Int] ={
        if(numbers.isEmpty) List()
        else numbers.map {
            i => if(i % 2 == 0) i / 2
            else i+1
        }
    }
    def main(args: Array[String]): Unit = {
        val list = List(1,2,3,4,5,6,7,8,9,10)
        val result = jiOu(list)
        println(s"$list\n变换后的结果是:\n$result")
    }
    
}